-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
78 changed files
with
49,223 additions
and
2,750 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
name: Qodana | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- 'releases/*' | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- 'releases/*' | ||
|
||
jobs: | ||
qodana: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
checks: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit | ||
fetch-depth: 0 # a full history is required for pull request analysis | ||
- name: 'Qodana Scan' | ||
uses: JetBrains/[email protected] | ||
env: | ||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} | ||
qodana: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
checks: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit | ||
fetch-depth: 0 # a full history is required for pull request analysis | ||
- name: 'Qodana Scan' | ||
uses: JetBrains/[email protected] | ||
env: | ||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ | |
"components": "@/components", | ||
"utils": "@/lib/utils" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { createMiddlewareClient } from "@supabase/auth-helpers-nextjs"; | ||
import { NextResponse } from "next/server"; | ||
import { createMiddlewareClient } from '@supabase/auth-helpers-nextjs'; | ||
import { NextResponse } from 'next/server'; | ||
|
||
import type { NextRequest } from "next/server"; | ||
import type { NextRequest } from 'next/server'; | ||
|
||
export async function middleware(req: NextRequest) { | ||
const res = NextResponse.next(); | ||
const supabase = createMiddlewareClient({ req, res }); | ||
await supabase.auth.getSession(); | ||
return res; | ||
const res = NextResponse.next(); | ||
const supabase = createMiddlewareClient({ req, res }); | ||
await supabase.auth.getSession(); | ||
return res; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
images: { | ||
domains: ["www.intelliq.dev", "lh3.googleusercontent.com"], | ||
}, | ||
images: { | ||
domains: ['www.intelliq.dev', 'lh3.googleusercontent.com'], | ||
}, | ||
}; | ||
|
||
module.exports = nextConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,31 @@ | ||
import {redirect} from "next/navigation"; | ||
import {cookies} from "next/headers"; | ||
import DashboardPage from "@/components/DashboardPage"; | ||
import {createServerComponentClient} from "@supabase/auth-helpers-nextjs"; | ||
import type {Metadata} from "next"; | ||
import {fetchAllQuizzes} from "@/utils/fetchAllQuizzes"; | ||
import Particles from "@/components/Particles"; | ||
import { redirect } from 'next/navigation'; | ||
import { cookies } from 'next/headers'; | ||
import DashboardPage from '@/components/DashboardPage'; | ||
import { createServerComponentClient } from '@supabase/auth-helpers-nextjs'; | ||
import type { Metadata } from 'next'; | ||
import { fetchAllQuizzes } from '@/utils/fetchAllQuizzes'; | ||
import Particles from '@/components/Particles'; | ||
|
||
export const metadata: Metadata = { | ||
title: "Dashboard", | ||
title: 'Dashboard', | ||
}; | ||
const Dashboard = async () => { | ||
const supabase = createServerComponentClient({ | ||
cookies, | ||
}); | ||
const {session} = (await supabase.auth.getSession()).data; | ||
const { session } = (await supabase.auth.getSession()).data; | ||
const accessToken = session?.access_token as string; | ||
const data = await fetchAllQuizzes(accessToken, 0); | ||
|
||
|
||
if (!session) { | ||
redirect("/"); | ||
redirect('/'); | ||
} | ||
return (<div> | ||
<DashboardPage prevQuizzes={data}/> | ||
<Particles | ||
className="absolute inset-0 -z-10 animate-fade-in" | ||
quantity={500} | ||
/> | ||
</div>); | ||
return ( | ||
<div> | ||
<DashboardPage prevQuizzes={data} /> | ||
<Particles className='animate-fade-in absolute inset-0 -z-10' quantity={500} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Dashboard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
"use client"; | ||
'use client'; | ||
|
||
export default function GlobalError({ | ||
error, | ||
reset, | ||
error, | ||
reset, | ||
}: { | ||
error: Error & { digest?: string }; | ||
reset: () => void; | ||
error: Error & { digest?: string }; | ||
reset: () => void; | ||
}) { | ||
return ( | ||
<html> | ||
<body> | ||
<h2>Something went wrong!</h2> | ||
<button onClick={() => reset()}>Try again</button> | ||
</body> | ||
</html> | ||
); | ||
return ( | ||
<html> | ||
<body> | ||
<h2>Something went wrong!</h2> | ||
<button onClick={() => reset()}>Try again</button> | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.