Skip to content

Commit

Permalink
v7.2.2
Browse files Browse the repository at this point in the history
v7.2.2
  • Loading branch information
platschi authored Jun 9, 2023
2 parents 01af003 + 3ba32eb commit f7414cb
Show file tree
Hide file tree
Showing 22 changed files with 587 additions and 231 deletions.
40 changes: 40 additions & 0 deletions components/ChatRoom/ChatRoom.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import Widgetbot from '@widgetbot/react-embed';
import { useState } from 'react';

import { Body } from 'components/Text';

export default function ChatRoom() {
const [showChat, setShowChat] = useState(false);
return (
<>
<a
href="#"
onClick={(e) => {
e.preventDefault();
setShowChat(!showChat);
}}
>
<Body color="secondary" style={{ marginRight: '18px' }}>
Chat
</Body>
</a>

{showChat && (
<Widgetbot
server="852273007370960937"
channel="852528616533000213"
shard="https://emerald.widgetbot.io"
width={500}
height={400}
style={{
position: 'absolute',
bottom: 0,
right: 0,
marginBottom: '50px',
marginRight: '50px',
}}
/>
)}
</>
);
}
25 changes: 19 additions & 6 deletions components/Media/Media.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
import dynamic from 'next/dynamic';
import { FC, ReactNode, memo } from 'react';

import { Media } from 'styles/media';
import { BREAKPOINTS } from 'styles/media';

type MediaProps = {
children: ReactNode;
};

const MediaQuery = dynamic(() => import('react-responsive'), {
ssr: false,
});

export const DesktopOnlyView: FC<MediaProps> = memo(({ children }) => (
<Media greaterThanOrEqual="md">{children}</Media>
<MediaQuery minWidth={BREAKPOINTS.md}>{children}</MediaQuery>
));

export const TabletOnlyView: FC<MediaProps> = memo(({ children }) => (
<Media between={['sm', 'md']}>{children}</Media>
<MediaQuery minWidth={BREAKPOINTS.sm} maxWidth={BREAKPOINTS.md - 1}>
{children}
</MediaQuery>
));

export const MobileOrTabletView: FC<MediaProps> = memo(({ children }) => (
<Media lessThan="md">{children}</Media>
<MediaQuery maxWidth={BREAKPOINTS.md - 1}>{children}</MediaQuery>
));

export const MobileHiddenView: FC<MediaProps> = memo(({ children }) => (
<Media greaterThan="xs">{children}</Media>
<MediaQuery minWidth={BREAKPOINTS.sm}>{children}</MediaQuery>
));

export const MobileOnlyView: FC<MediaProps> = memo(({ children }) => (
<Media at="xs">{children}</Media>
<MediaQuery minWidth={BREAKPOINTS.xs} maxWidth={BREAKPOINTS.sm - 1}>
{children}
</MediaQuery>
));

export const NotMobileView: FC<MediaProps> = memo(({ children }) => (
<MediaQuery minWidth={BREAKPOINTS.sm}>{children}</MediaQuery>
));
Loading

1 comment on commit f7414cb

@vercel
Copy link

@vercel vercel bot commented on f7414cb Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kwenta – ./

kwenta-git-main-kwenta.vercel.app
kwenta-kwenta.vercel.app
kwenta.io

Please sign in to comment.