-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into JUP-88-Update-About-Page
- Loading branch information
Showing
26 changed files
with
697 additions
and
399 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,14 +1,16 @@ | ||
files=$(npx prettier . -l) | ||
status=$? | ||
if [ $status == 0 ]; then | ||
echo "## Formatting Check passed 🥳" >>$GITHUB_STEP_SUMMARY | ||
echo "All files are formatted correctly" >>$GITHUB_STEP_SUMMARY | ||
exit 0 | ||
echo "## Formatting Check passed 🥳" >>$GITHUB_STEP_SUMMARY | ||
echo "All files are formatted correctly" >>$GITHUB_STEP_SUMMARY | ||
exit 0 | ||
else | ||
echo "## Formatting Check Failed 😅" >>$GITHUB_STEP_SUMMARY | ||
echo "Please run prettier using \`npx prettier . --write\` in order to format your code" >>$GITHUB_STEP_SUMMARY | ||
echo "### Files with bad formatting:" >>$GITHUB_STEP_SUMMARY | ||
for file in $files; do | ||
echo "- $file" >>$GITHUB_STEP_SUMMARY | ||
echo "::error file=$file::$file not formatted correctly" | ||
done | ||
exit 1 | ||
echo "## Formatting Check Failed 😅" >>$GITHUB_STEP_SUMMARY | ||
echo "Please run prettier using \`npx prettier . --write\` in order to format your code" >>$GITHUB_STEP_SUMMARY | ||
echo "### Files with bad formatting:" >>$GITHUB_STEP_SUMMARY | ||
for file in $files; do | ||
echo "- $file" >>$GITHUB_STEP_SUMMARY | ||
echo "::error file=$file::$file not formatted correctly" | ||
done | ||
exit 1 | ||
fi |
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* @see https://prettier.io/docs/en/configuration.html | ||
* @type {import("prettier").Config} | ||
*/ | ||
const config = { | ||
printWidth: 80, | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'all', | ||
useTabs: false, | ||
bracketSameLine: false, | ||
plugins: ['prettier-plugin-tailwindcss'], | ||
}; | ||
|
||
export default config; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
'use client'; | ||
import { api } from '@src/trpc/react'; | ||
import type { SelectClub as Club } from '@src/server/db/models'; | ||
import { type Session } from 'next-auth'; | ||
import ClubCard from '@src/components/club/ClubCard'; | ||
|
||
interface ClubSearchComponentProps { | ||
userSearch: string; | ||
session: Session | null; | ||
} | ||
|
||
export const ClubSearchComponent = ({ | ||
userSearch, | ||
session, | ||
}: ClubSearchComponentProps) => { | ||
const { data } = api.club.byNameNoLimit.useQuery( | ||
{ name: userSearch }, | ||
{ enabled: !!userSearch }, | ||
); | ||
|
||
if (!data) { | ||
return <p />; | ||
} | ||
if (data.length === 0) { | ||
return <p>No results found</p>; | ||
} | ||
|
||
return ( | ||
<div className="grid w-full auto-rows-fr grid-cols-[repeat(auto-fill,320px)] justify-center gap-16 pb-4"> | ||
{data.map((club: Club) => ( | ||
<ClubCard key={club.id} club={club} session={session} priority /> | ||
))} | ||
</div> | ||
); | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Header from '@src/components/header/BaseHeader'; | ||
import { ClubSearchComponent } from './ClubSearch'; | ||
import { getServerAuthSession } from '@src/server/auth'; | ||
|
||
type Params = { | ||
searchParams: { [key: string]: string | undefined }; | ||
}; | ||
|
||
const clubSearch = async (props: Params) => { | ||
const { searchParams } = props; | ||
const userSearch = searchParams['search'] || ''; | ||
const session = await getServerAuthSession(); | ||
|
||
return ( | ||
<main className="md:pl-72"> | ||
<div> | ||
<Header /> | ||
<ClubSearchComponent userSearch={userSearch} session={session} /> | ||
</div> | ||
</main> | ||
); | ||
}; | ||
|
||
export default clubSearch; |
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.