Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Upgrade dependencies #70

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion archiver/archive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface LegacyShowList {
* Archive S3 bucket API
*/
export const fetchArchivedShowlist = async (
showlistId: string
showlistId: string,
): Promise<ShowsByDate> => {
if (!showlistBaseUrl) {
console.error('Arkiston polkua ei ole määritetty');
Expand Down
2 changes: 1 addition & 1 deletion archiver/archiveCrawlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const ARCHIVE_SOURCE_URL = process.env.ARCHIVE_SOURCE_URL || '';
const archiveGogleSheet = async (
config: GoogleConfigSheets,
name: string,
showStartTime: string
showStartTime: string,
) => {
const archivePath = getArchivePath(name);
const pictureFolder = path.join(archivePath, 'pictures');
Expand Down
2 changes: 1 addition & 1 deletion components/ShoutBox/nameformatter.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import Image from 'next/image';
import Image from 'next/legacy/image';
import { format } from 'date-fns';

interface NameFormatterProps {
Expand Down
4 changes: 2 additions & 2 deletions components/ShoutBox/shoutbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ const Chat = ({ limit, isOpen }: ShoutBoxProps) => {
webSocket.current.send(
JSON.stringify({
type: 'reload',
})
}),
);

if (!!name) {
if (name) {
handleSubmitName(name);
}

Expand Down
17 changes: 8 additions & 9 deletions components/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ const LinkButton: FC<LinkButtonProps> = ({
const rel = isExternal ? 'noopener noreferrer' : null;

return (
<Link href={href}>
<a
target={target}
rel={rel}
className={`${buttonStyle} ${className || ''}`}
{...props}
>
{children}
</a>
<Link
href={href}
target={target}
rel={rel}
className={`${buttonStyle} ${className || ''}`}
{...props}
>
{children}
</Link>
);
};
Expand Down
21 changes: 11 additions & 10 deletions components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Image from 'next/legacy/image';
import Link from 'next/link';
import {
AiFillFacebook,
AiFillGithub,
AiOutlineInstagram,
AiOutlineMail,
} from 'react-icons/ai';
import { FaDiscord, FaTelegramPlane } from 'react-icons/fa';
import Image from 'next/image';
import Link from 'next/link';

import { NavigationItem } from '@/contentful/client';

Expand All @@ -27,12 +27,13 @@ const Footer = ({ navigationItems }: FooterProps) => {
alt="Logo of Turun Wappuradio ry"
/>
</div>
<Link href="/tietosuojaseloste">
<a className="mt-6 text-sm text-white opacity-50">
© Turun Wappuradio ry
<br />
Tietosuojaseloste
</a>
<Link
href="/tietosuojaseloste"
className="mt-6 text-sm text-white opacity-50"
>
© Turun Wappuradio ry
<br />
Tietosuojaseloste
</Link>
</div>
</div>
Expand Down Expand Up @@ -64,8 +65,8 @@ interface NavLinkProps {

const NavLink = ({ slug, name }: NavLinkProps) => (
<li key={slug} className="my-3">
<Link href={'/' + slug}>
<a className="font-bold hover:underline">{name}</a>
<Link href={'/' + slug} className="font-bold hover:underline">
{name}
</Link>
</li>
);
Expand Down
8 changes: 6 additions & 2 deletions components/hamburger/hamburger.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

.line {
fill: none;
transition: stroke-dasharray 400ms, stroke-dashoffset 400ms;
transition:
stroke-dasharray 400ms,
stroke-dashoffset 400ms;
stroke: #fff;
stroke-width: 5.5;
stroke-linecap: round;
Expand All @@ -33,7 +35,9 @@
.bottom {
stroke-dasharray: 40 85;
transform-origin: 50%;
transition: transform 400ms, stroke-dashoffset 400ms;
transition:
transform 400ms,
stroke-dashoffset 400ms;
}

.top_active {
Expand Down
11 changes: 7 additions & 4 deletions components/hero.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FC, useState } from 'react';
import Image from 'next/image';
import Image from 'next/legacy/image';
import Link from 'next/link';
import { FC, useState } from 'react';

import { NavigationItem } from '@/contentful/client';
import { contentfulImageLoader } from '@/contentful/contentfulImageLoader';
Expand Down Expand Up @@ -131,8 +131,11 @@ const Hero: FC<HeroProps> = ({

const NavLink = ({ href, name }: { href: string; name: string }) => (
<li className="p-4">
<Link href={href}>
<a className="text-xl text-white transition hover:text-coral">{name}</a>
<Link
href={href}
className="text-xl text-white transition hover:text-coral"
>
{name}
</Link>
</li>
);
Expand Down
14 changes: 6 additions & 8 deletions components/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,21 @@ const Menu = ({ navigationItems, isOpen, closeMenu }: MenuProps) => (
>
<ul className="px-8 pt-24">
<li>
<Link href="/">
<a className="p-2 text-2xl">Radio</a>
<Link href="/" className="p-2 text-2xl">
Radio
</Link>
</li>

{navigationItems.map(({ name, slug }) => (
<li key={slug} className="my-5">
<Link href={`/${slug}`}>
<a className="p-2 text-2xl" onClick={closeMenu}>
{name}
</a>
<Link href={`/${slug}`} className="p-2 text-2xl" onClick={closeMenu}>
{name}
</Link>
</li>
))}
<li>
<Link href="/arkisto">
<a className="p-2 text-2xl">Arkisto</a>
<Link href="/arkisto" className="p-2 text-2xl">
Arkisto
</Link>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion components/player.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Image from 'next/legacy/image';
import { useEffect, useState } from 'react';
import { FiMessageSquare, FiPause, FiPlay, FiVideo } from 'react-icons/fi';
import Image from 'next/image';
import { format } from 'date-fns';

import useShoutBoxAndVideo from '@/hooks/useShoutboxAndVideo';
Expand Down
2 changes: 1 addition & 1 deletion components/responsiveShowlist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const ResponsiveShowlist = ({
const [selectedDate, setSelectedDate] = useState<string>(
Object.keys(showsByDate).includes(format(new Date(), 'y.M.dd'))
? format(new Date(), 'y.M.dd')
: Object.keys(showsByDate)[0]
: Object.keys(showsByDate)[0],
);

const setDateAndScroll = (date: string) => {
Expand Down
6 changes: 3 additions & 3 deletions components/richtext.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { FC } from 'react';
import Image from 'next/image';
import {
documentToReactComponents,
Options,
} from '@contentful/rich-text-react-renderer';
import { BLOCKS, INLINES, MARKS } from '@contentful/rich-text-types';
import Image from 'next/legacy/image';

import { contentfulImageLoader } from '../contentful/contentfulImageLoader';
import { LinkButton } from './button';
Expand Down Expand Up @@ -63,7 +63,7 @@ const renderOptions = (links?: any): Options => {
if (
React.Children.map(
children,
(child: any) => child?.type === 'u'
(child: any) => child?.type === 'u',
).every(Boolean)
) {
return (
Expand All @@ -72,7 +72,7 @@ const renderOptions = (links?: any): Options => {
{React.Children.map(children, (child: any) =>
React.cloneElement(child, {
className: 'no-underline',
})
}),
)}
</LinkButton>
</span>
Expand Down
2 changes: 1 addition & 1 deletion components/showcard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import Image from 'next/image';
import { format } from 'date-fns';
import fi from 'date-fns/locale/fi';
import Image from 'next/legacy/image';

import { Show } from '@/scripts/google/showlistHelpers';
import placeholderImage from '../public/kuva_puuttuu_v2.jpeg';
Expand Down
2 changes: 1 addition & 1 deletion components/showlistMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const ShowlistMap = ({ showsByDate }: ShowlistMapProps) => {
key={i}
showLength={differenceInMinutes(
new Date(show.end),
new Date(show.start)
new Date(show.start),
)}
text={show?.name}
color={show?.color}
Expand Down
6 changes: 3 additions & 3 deletions contentful/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ export interface NavigationItem {

const fetchNavigationItems = async (): Promise<NavigationItem[]> => {
const navigationItems = await fetchContent<NavigationItemsQuery>(
NavigationItemsDocument
NavigationItemsDocument,
);
return navigationItems.navigationCollection.items[0].pagesCollection.items;
};

const fetchContent = async <T>(
query: DocumentNode,
variables?: any
variables?: any,
): Promise<T> => {
try {
const _apolloClient = apolloClient ?? createApolloClient();
Expand All @@ -38,7 +38,7 @@ const fetchContent = async <T>(
return data;
} catch (error) {
console.error(
`There was a problem retrieving entries with the query ${query}`
`There was a problem retrieving entries with the query ${query}`,
);
console.error(error);
}
Expand Down
Loading
Loading