Skip to content

Commit

Permalink
Issue #PS-1521 fix: Upcoming Extra Sessions cards copy UI implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas143shinde committed Jul 26, 2024
1 parent 341d1cb commit a550900
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
29 changes: 28 additions & 1 deletion src/components/SessionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Box, Typography } from '@mui/material';
import { Session, SessionsCardProps } from '@/utils/Interfaces';

import CenterSessionModal from './CenterSessionModal';
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
import EditOutlined from '@mui/icons-material/EditOutlined';
import PlannedSession from './PlannedSession';
import React from 'react';
Expand All @@ -12,6 +13,9 @@ const SessionsCard: React.FC<SessionsCardProps> = ({ data, children }) => {
const [open, setOpen] = React.useState(false);
const handleOpen = () => setOpen(true);
const handleClose = () => setOpen(false);

console.log(data.url, 'shreyas');

return (
<Box
sx={{
Expand All @@ -24,7 +28,7 @@ const SessionsCard: React.FC<SessionsCardProps> = ({ data, children }) => {
sx={{
display: 'flex',
justifyContent: 'space-between',
padding: '8px 16px',
padding: '8px 16px 4px',
}}
>
<Box>
Expand All @@ -46,6 +50,29 @@ const SessionsCard: React.FC<SessionsCardProps> = ({ data, children }) => {
</Box>
<EditOutlined onClick={handleOpen} sx={{ cursor: 'pointer' }} />
</Box>
<Box
sx={{
padding: '0px 16px 8px',
display: 'flex',
justifyContent: 'space-between',
gap: '30px',
}}
>
<Box
sx={{
fontSize: '14px',
color: '#0D599E',
fontWeight: '500',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
overflow: 'hidden',
width: '100%',
}}
>
{data?.url}
</Box>
<ContentCopyIcon sx={{ fontSize: '18px', color: '#0D599E' }} />
</Box>
<CenterSessionModal
open={open}
handleClose={handleClose}
Expand Down
2 changes: 2 additions & 0 deletions src/services/Sessionservice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ export const getSessions = (cohortId: string) => {
teacherName: 'Mahima Shastri',
topic: 'real numbers',
subtopic: 'irrational numbers',
url: 'https://zoom.us/j/92735086013?a3t2172..',
},
{
id: 2,
subject: 'Mathematics',
time: '11 am - 12 pm',
teacherName: 'vivek kasture',
url: 'https://zoom.us/j/92735086013?a3t2172',
},
{
id: 3,
Expand Down
1 change: 1 addition & 0 deletions src/utils/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ export interface Session {
teacherName: string;
topic?: string;
subtopic?: string;
url?: string;
}

export interface SessionCardFooterProps {
Expand Down

0 comments on commit a550900

Please sign in to comment.