Skip to content

Commit

Permalink
Removed React.FC from components (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmreetKumarkhuntia authored Jul 26, 2023
1 parent 86378dc commit 86d086f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/components/Goal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface Goal {
description: string | null;
}

const Goals: React.FC<GoalProps> = ({ goal }) => {
const Goals = ({ goal }: GoalProps) => {
const utils = trpc.useContext();
const { data: subgoals, isLoading } = trpc.iep.getSubgoals.useQuery({
goal_id: goal.goal_id,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Subgoal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface Subgoal {
description: string | null;
}

const Subgoals: React.FC<SubgoalProps> = ({ subgoal }) => {
const Subgoals = ({ subgoal }: SubgoalProps) => {
return (
<div>
<h4>Subgoal</h4>
Expand Down
7 changes: 1 addition & 6 deletions src/components/para_trials/counter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ interface CounterProps {
color: "blue" | "green" | "yellow";
}

const Counter: React.FC<CounterProps> = ({
title,
maxCount,
minCount,
color,
}) => {
const Counter = ({ title, maxCount, minCount, color }: CounterProps) => {
// Count variable may need to become a prop, depending on how we implement
const [count, setCount] = useState(0);

Expand Down
2 changes: 1 addition & 1 deletion src/components/para_trials/progressBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interface ProgressBarProps {
fillPercent: number;
}

const ProgressBar: React.FC<ProgressBarProps> = ({ fillPercent }) => {
const ProgressBar = ({ fillPercent }: ProgressBarProps) => {
return (
<div
style={{
Expand Down
2 changes: 1 addition & 1 deletion src/components/para_trials/taskCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface TaskCardProps {
};
}

const TaskCard: React.FC<TaskCardProps> = ({ task }) => {
const TaskCard = ({ task }: TaskCardProps) => {
const getDateStyle = () => {
//New or done should be green
if (task.completion_rate === 0 || task.completion_rate === 100) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/para_trials/timer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface TimerProps {
timeInSec: number;
}

const Timer: React.FC<TimerProps> = ({ timeInSec }) => {
const Timer = ({ timeInSec }: TimerProps) => {
const { seconds, minutes, hours, days, isRunning, pause, resume, restart } =
useTimer({ expiryTimestamp: new Date(), autoStart: false });

Expand Down
2 changes: 1 addition & 1 deletion src/components/para_trials/timerInputPad.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface TimerInputProps {
onStartTimer: (inputTimeInSec: number) => void;
}

const TimerInput: React.FC<TimerInputProps> = ({ onStartTimer }) => {
const TimerInput = ({ onStartTimer }: TimerInputProps) => {
const [inputTime, setInputTime] = useState<string>("");

const addNumber = (num: string) => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/students/iep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interface StudentIEPProps {
}

// TODO: Move this to the components directory
const StudentIEP: React.FC<StudentIEPProps> = ({ first_name, last_name }) => {
const StudentIEP = ({ first_name, last_name }: StudentIEPProps) => {
return (
<div>
<h1>
Expand Down

0 comments on commit 86d086f

Please sign in to comment.