Skip to content

Commit

Permalink
fixed #105 for real
Browse files Browse the repository at this point in the history
  • Loading branch information
au5ton committed Feb 3, 2023
1 parent 4f00ac7 commit 8c55f36
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 68 deletions.
2 changes: 1 addition & 1 deletion components/groupcontent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Chip from '@mui/material/Chip'
import Skeleton from '@mui/material/Skeleton'
import Typography from '@mui/material/Typography'
import useMediaQuery from '@mui/material/useMediaQuery'
import Tilty from 'react-tilty'
import Tilty from '@au5ton/react-tilty'
import { Chart } from 'react-google-charts'
import { InstructorCard, InstructorCardSkeleton } from './instructorcard'
import { GroupResult, PopulatedGroupResult } from '../lib/data/useAllGroups'
Expand Down
39 changes: 0 additions & 39 deletions local-types/react-tilty.ts

This file was deleted.

2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const withTM = require('next-transpile-modules')(['fitty', 'react-fitty', 'react-tilty']);
const withTM = require('next-transpile-modules')(['fitty', 'react-fitty', '@au5ton/react-tilty']);

/** @type {import('next/dist/next-server/server/config').NextConfig} */
module.exports = withTM({
Expand Down
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"react-google-charts": "^4.0.0",
"react-highlight-words": "^0.17.0",
"react-swipeable": "^6.1.2",
"react-tilty": "^2.0.3",
"@au5ton/react-tilty": "^2.0.4",
"react-transition-group": "^4.4.2",
"react-use": "^17.2.4",
"reactfire": "^4.2.2",
Expand Down
3 changes: 3 additions & 0 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import type { AppProps } from 'next/app'
import { SWRConfig } from 'swr'
import { ThemeProvider } from '@mui/material/styles'
//import { FirebaseAppProvider } from 'reactfire'
// @ts-ignore
const FirebaseAppProvider = dynamic(() => import('../lib/firebase').then(mod => mod.FirebaseAppProviderWrapper));
// @ts-ignore
const RecoilRoot = dynamic(() => import('recoil').then(mod => mod.RecoilRoot))
// @ts-ignore
const PageViewLogger = dynamic(() => import('../components/pageviewlogger').then(mod => mod.PageViewLogger))
//import Layout from '../components/layout'
// eslint-disable-next-line react/display-name
Expand Down
8 changes: 7 additions & 1 deletion pages/api/group/[groupId]/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@ export default async function GetOneGroup(req: NextApiRequest, res: NextApiRespo
const { groupId } = req.query;
const result = await getOneGroup(extract(groupId))
res.setHeader('Cache-Control', CACHE_CONTROL);
res.json(result);
if (result) {
res.json(result);
}
else {
res.statusCode = 404;
res.send('Group Not Found' as any);
}
}
2 changes: 1 addition & 1 deletion pages/c/[courseName].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Chip from '@mui/material/Chip'
import Skeleton from '@mui/material/Skeleton'
import Alert from '@mui/material/Alert'
import AlertTitle from '@mui/material/AlertTitle'
import Tilty from 'react-tilty'
import Tilty from '@au5ton/react-tilty'
import { Chart } from 'react-google-charts'
import { Course, PublicationInfo } from '@cougargrades/types'
import { PankoRow } from '../../components/panko'
Expand Down
2 changes: 1 addition & 1 deletion pages/i/[instructorName].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Skeleton from '@mui/material/Skeleton'
import Container from '@mui/material/Container'
import Typography from '@mui/material/Typography'
import RateReviewIcon from '@mui/icons-material/RateReview'
import Tilty from 'react-tilty'
import Tilty from '@au5ton/react-tilty'
import { Chart } from 'react-google-charts'
import { Instructor } from '@cougargrades/types'
import abbreviationMap from '@cougargrades/publicdata/bundle/edu.uh.publications.subjects/subjects.json'
Expand Down
8 changes: 0 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,9 @@
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
/**
* TODO: Set to `true` when this pull request is accepted:
* https://github.com/jonahallibone/react-tilty/pull/14
*/
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"typeRoots": [
"node_modules/@types",
"local-types"
]
},
"include": [
"**/*.ts",
Expand Down

0 comments on commit 8c55f36

Please sign in to comment.