Skip to content

Commit

Permalink
updated node-sass to sass in package.json (#1118)
Browse files Browse the repository at this point in the history
* updated node-sass to sass in package.json

* converted class component to functional component in skill.js
  • Loading branch information
Dheeraj4103 authored Aug 23, 2024
1 parent 42769c3 commit ff96330
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 2,606 deletions.
63 changes: 27 additions & 36 deletions frontend/src/components/profile/skill.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,30 @@
import React, { Component } from 'react'
import { withRouter } from 'react-router-dom'
import { injectIntl } from 'react-intl'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import React from "react";
import { withRouter } from "react-router-dom";
import { injectIntl } from "react-intl";
import PropTypes from "prop-types";
import classNames from "classnames";

import {
Grid,
Typography,
Checkbox,
Avatar,
} from '@material-ui/core'
import FolderIcon from '@material-ui/icons/Folder'
import { Grid, Typography, Checkbox, Avatar } from "@material-ui/core";
import FolderIcon from "@material-ui/icons/Folder";

class Skill extends Component {
render () {
const { classes, title } = this.props

return (
<Grid container direction='row' alignItems='center' xs={ 6 }>
<Grid item xs={ 2 }>
<Avatar className={ classNames(classes.avatar, classes.bigAvatar) }>
<FolderIcon />
</Avatar>
</Grid>
<Grid item xs={ 6 }>
<Typography variant='body1' color='default'>
{ title }
</Typography>
</Grid>
<Grid item xs={ 4 } alignItems='flex-end'>
<Checkbox onClick={ this.props.onClick } checked={ this.props.isSelected ? 'checked' : '' } />
</Grid>
function Skill({ classes, title, onClick, isSelected }) {
return (
<Grid container direction="row" alignItems="center" xs={6}>
<Grid item xs={2}>
<Avatar className={classNames(classes.avatar, classes.bigAvatar)}>
<FolderIcon />
</Avatar>
</Grid>
<Grid item xs={6}>
<Typography variant="body1" color="default">
{title}
</Typography>
</Grid>
)
}
<Grid item xs={4} alignItems="flex-end">
<Checkbox onClick={onClick} checked={isSelected ? "checked" : ""} />
</Grid>
</Grid>
);
}

Skill.propTypes = {
Expand All @@ -42,7 +33,7 @@ Skill.propTypes = {
language: PropTypes.string,
title: PropTypes.string,
onClick: PropTypes.func.isRequired,
isSelected: PropTypes.bool
}
isSelected: PropTypes.bool,
};

export default injectIntl(withRouter(Skill))
export default injectIntl(withRouter(Skill));
Loading

0 comments on commit ff96330

Please sign in to comment.