Skip to content

Commit

Permalink
switched source url to /django/...
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadgaz committed Sep 26, 2024
1 parent acbd3b3 commit a39128d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/(main)/courses/[id]/@reviews/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const getKey =
(pageIndex: number, previousPageData: CoursesIDReviewsResponse) => {
if (previousPageData && previousPageData.page === previousPageData.pages)
return null;
return `/api/core/courses/${id}/reviews?page=${pageIndex + 1}&${params}`;
return `/django/core/courses/${id}/reviews?page=${pageIndex + 1}&${params}`;
};

const Skeleton = () =>
Expand Down
2 changes: 1 addition & 1 deletion app/(main)/courses/[id]/@schedules/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const getKey =
(pageIndex: number, previousPageData: CoursesIDSchedulesResponse) => {
if (previousPageData && previousPageData.page === previousPageData.pages)
return null;
return `/api/core/courses/${id}/schedules?page=${pageIndex + 1}`;
return `/django/core/courses/${id}/schedules?page=${pageIndex + 1}`;
};

export default function Page({ params }: { params: { id: string } }) {
Expand Down
2 changes: 1 addition & 1 deletion app/(main)/professors/[id]/@reviews/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const getKey =
(pageIndex: number, previousPageData: ProfessorsIDReviewsResponse) => {
if (previousPageData && previousPageData.page === previousPageData.pages)
return null;
return `/api/core/professors/${id}/reviews?page=${pageIndex + 1}&${params}`;
return `/django/core/professors/${id}/reviews/?page=${pageIndex + 1}&${params}`;
};

const Skeleton = () =>
Expand Down
2 changes: 1 addition & 1 deletion app/(main)/professors/[id]/@schedules/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const getKey =
(pageIndex: number, previousPageData: ProfessorsIDSchedulesResponse) => {
if (previousPageData && previousPageData.page === previousPageData.pages)
return null;
return `/api/core/professors/${id}/schedules?page=${pageIndex + 1}`;
return `/django/core/professors/${id}/schedules/?page=${pageIndex + 1}`;
};

export default function Page({ params }: { params: { id: string } }) {
Expand Down
4 changes: 2 additions & 2 deletions components/molecules/client/auth-btn/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ export const AuthBtn: React.FC<Props> = ({ ...props }) => {
const session = useSession();
if (session) {
return (
<LinkBtn {...props} href="/api/google/logout" variant="ghost">
<LinkBtn {...props} href="/django/google/logout" variant="ghost">
Sign out
</LinkBtn>
);
}
return (
<LinkBtn
{...props}
href="/api/google/authorize"
href="/django/google/authorize"
className="!gap-sm bg-background text-text"
variant="primary"
>
Expand Down
6 changes: 3 additions & 3 deletions components/molecules/client/nav-search-bar/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const useCoursesSearchResults = (currentQuery: string) => {
apiQueryParams.set('query', currentQuery);
apiQueryParams.set('limit', '3');
const { data, error, isLoading } = useSWR<CoursesSearchResponse, Error>(
`/api/core/courses/search?${apiQueryParams.toString()}`,
`/django/core/courses/search?${apiQueryParams.toString()}`,
);
return { data, error, isLoading };
};
Expand All @@ -31,7 +31,7 @@ const useProfessorsSearchResults = (currentQuery: string) => {
apiQueryParams.set('limit', '3');

const { data, error, isLoading } = useSWR<ProfessorsSearchResponse, Error>(
`/api/core/professors/search?${apiQueryParams.toString()}`,
`/django/core/professors/search?${apiQueryParams.toString()}`,
);
return { data, error, isLoading };
};
Expand All @@ -41,7 +41,7 @@ const useSchedulesSearchResults = (currentQuery: string) => {
apiQueryParams.set('query', currentQuery);
apiQueryParams.set('limit', '3');
const { data, error, isLoading } = useSWR<SchedulesSearchResponse, Error>(
`/api/core/schedules/search?${apiQueryParams.toString()}`,
`/django/core/schedules/search?${apiQueryParams.toString()}`,
);
return { data, error, isLoading };
};
Expand Down
4 changes: 2 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const nextConfig = {
async rewrites() {
return [
{
source: '/api/:root*',
destination: `${process.env.BASE_API_URL || ''}/:root*`,
source: '/django/:root*',
destination: `${process.env.BASE_API_URL || ''}/:root*/`,
},
];
},
Expand Down

0 comments on commit a39128d

Please sign in to comment.