Skip to content

Commit

Permalink
prettier going brrr
Browse files Browse the repository at this point in the history
  • Loading branch information
RickyRAV committed Feb 5, 2024
1 parent 22e8733 commit e1f609c
Show file tree
Hide file tree
Showing 78 changed files with 49,223 additions and 2,750 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/code_quality.yml
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 }}
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# IntelliQ

Quiz Yourself on Your Chosen Topic with IntelliQ

<a href="https://www.producthunt.com/posts/intelliq?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intelliq" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=430933&theme=dark" alt="IntelliQ - Take&#0032;a&#0032;step&#0032;beyond&#0032;conventional&#0032;quiz&#0032;platforms&#0046; | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>

### Semantic JIRA Commit Messages

`git commit -m ITP-TicketNumber message`

### Semantic Branch Names

Format: `<type>/#<issueNumber>-<alias>`

#### Example

```
feature/#1-init
^------^ ^---^
Expand All @@ -17,11 +22,13 @@ feature/#1-init
|
+-------> Type: or feat, chore, docs, fix, refactor, style, or test.
```

**Commit Message Conventions:**
- `feat` or `feature`: (new feature for the user, not a new feature for build script)
- `fix`: (bug fix for the user, not a fix to a build script)
- `docs`: (changes to the documentation)
- `style`: (formatting, missing semi colons, etc; no production code change)
- `refactor`: (refactoring production code, eg. renaming a variable)
- `test`: (adding missing tests, refactoring tests; no production code change)
- `chore`: (updating grunt tasks etc; no production code change)

- `feat` or `feature`: (new feature for the user, not a new feature for build script)
- `fix`: (bug fix for the user, not a fix to a build script)
- `docs`: (changes to the documentation)
- `style`: (formatting, missing semi colons, etc; no production code change)
- `refactor`: (refactoring production code, eg. renaming a variable)
- `test`: (adding missing tests, refactoring tests; no production code change)
- `chore`: (updating grunt tasks etc; no production code change)
2 changes: 1 addition & 1 deletion components.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
"components": "@/components",
"utils": "@/lib/utils"
}
}
}
14 changes: 7 additions & 7 deletions middleware.ts
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';

Check failure on line 1 in middleware.ts

View workflow job for this annotation

GitHub Actions / Qodana for JS

ESLint

ESLint: Install the 'eslint' package
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;
}
6 changes: 3 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @type {import('next').NextConfig} */

Check failure on line 1 in next.config.js

View workflow job for this annotation

GitHub Actions / Qodana for JS

ESLint

ESLint: Install the 'eslint' package
const nextConfig = {
images: {
domains: ["www.intelliq.dev", "lh3.googleusercontent.com"],
},
images: {
domains: ['www.intelliq.dev', 'lh3.googleusercontent.com'],
},
};

module.exports = nextConfig;
10 changes: 5 additions & 5 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {

Check failure on line 1 in postcss.config.js

View workflow job for this annotation

GitHub Actions / Qodana for JS

ESLint

ESLint: Install the 'eslint' package
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
27,953 changes: 27,952 additions & 1 deletion public/404.json

Large diffs are not rendered by default.

15,374 changes: 15,373 additions & 1 deletion public/loading.json

Large diffs are not rendered by default.

1,571 changes: 1,570 additions & 1 deletion public/loading2.json

Large diffs are not rendered by default.

1,640 changes: 1,639 additions & 1 deletion public/summarizing.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
#-------------------------------------------------------------------------------#
# Qodana analysis is configured by qodana.yaml file #
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
#-------------------------------------------------------------------------------#
version: "1.0"
version: '1.0'

#Specify inspection profile for code analysis
profile:
name: qodana.starter
name: qodana.starter

#Enable inspections
#include:
Expand Down
17 changes: 8 additions & 9 deletions src/app/GoogleAnalytics.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
'use client'
'use client';

Check failure on line 1 in src/app/GoogleAnalytics.tsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

ESLint

ESLint: Install the 'eslint' package

import Script from "next/script";
import * as gtag from "../utils/gtag.js";
import Script from 'next/script';
import * as gtag from '../utils/gtag.js';

const GoogleAnalytics = () => {

return (
<>
<Script
strategy="afterInteractive"
strategy='afterInteractive'
src={`https://www.googletagmanager.com/gtag/js?id=${gtag.GA_TRACKING_ID}`}
/>
<Script
id="gtag-init"
strategy="afterInteractive"
id='gtag-init'
strategy='afterInteractive'
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
Expand All @@ -26,7 +25,7 @@ const GoogleAnalytics = () => {
}}
/>
</>
)
}
);
};

export default GoogleAnalytics;
18 changes: 9 additions & 9 deletions src/app/dashboard/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {Skeleton} from "@/components/ui/skeleton";
import { Skeleton } from '@/components/ui/skeleton';

Check failure on line 1 in src/app/dashboard/loading.tsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

ESLint

ESLint: Install the 'eslint' package

const loading = () => {
return (
<div className='flex flex-col items-center justify-center'>
<Skeleton className='flex h-9 w-56 mb-5 rounded-full'/>
<Skeleton className='flex h-9 w-40 mb-5 rounded-full'/>
<div className='lg:grid lg:grid-flow-col gap-8 mt-12 m-2'>
<Skeleton className='mb-5 flex h-9 w-56 rounded-full' />
<Skeleton className='mb-5 flex h-9 w-40 rounded-full' />
<div className='m-2 mt-12 gap-8 lg:grid lg:grid-flow-col'>
<div className='col-span-1 m-4 lg:m-0'>
<Skeleton className='w-full h-[150px] rounded-lg'/>
<Skeleton className='h-[150px] w-full rounded-lg' />
</div>
<div className='row-span-2 mt-10 col-span-1 m-4 lg:m-0'>
<Skeleton className='lg:w-[410px] w-full h-[370px] rounded-lg'/>
<div className='col-span-1 row-span-2 m-4 mt-10 lg:m-0'>
<Skeleton className='h-[370px] w-full rounded-lg lg:w-[410px]' />
</div>
<div className='row-span-3 mt-10 lg:mt-0 m-4 lg:m-0'>
<Skeleton className='w-[546px] h-[554px] rounded-lg'/>
<div className='row-span-3 m-4 mt-10 lg:m-0 lg:mt-0'>
<Skeleton className='h-[554px] w-[546px] rounded-lg' />
</div>
</div>
</div>
Expand Down
34 changes: 16 additions & 18 deletions src/app/dashboard/page.tsx
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';

Check failure on line 1 in src/app/dashboard/page.tsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

ESLint

ESLint: Install the 'eslint' package
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;
26 changes: 13 additions & 13 deletions src/app/global-error.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
"use client";
'use client';

Check failure on line 1 in src/app/global-error.tsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

ESLint

ESLint: Install the 'eslint' package

export default function GlobalError({
error,
reset,
error,

Check warning on line 4 in src/app/global-error.tsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unused local symbol

Unused parameter 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>
);
}
56 changes: 28 additions & 28 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,44 @@
@tailwind utilities;

@layer base {
:root {
--background: 0 0% 2%;
--foreground: 0 0% 100%;
:root {
--background: 0 0% 2%;
--foreground: 0 0% 100%;

--card: 180 4% 5%;
--card-foreground: 0 0% 100%;
--card: 180 4% 5%;
--card-foreground: 0 0% 100%;

--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;

--primary: 255 100% 86%;
--primary-foreground: 180 4% 5%;
--primary: 255 100% 86%;
--primary-foreground: 180 4% 5%;

--secondary: 180 4% 5%;
--secondary-foreground: 222.2 47.4% 11.2%;
--secondary: 180 4% 5%;
--secondary-foreground: 222.2 47.4% 11.2%;

--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;

--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;

--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;

--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;
--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;

--radius: 0.5rem;
}
--radius: 0.5rem;
}
}

@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
Loading

0 comments on commit e1f609c

Please sign in to comment.