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

feat: Get grade context from sandbag #925

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
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
39 changes: 1 addition & 38 deletions src/js/grades/Grade.ts
Original file line number Diff line number Diff line change
@@ -1,44 +1,7 @@
import { GradeScales, getScale } from '@openbeta/sandbag'
import { gradeContextToGradeScales, getScale } from '@openbeta/sandbag'
import { RulesType, GradeContextType, GradeValuesType, ClimbDisciplineRecord } from '../types'
import { EditableClimbType } from '../../components/crag/cragSummary'

const gradeContextToGradeScales = {
US: {
trad: GradeScales.YDS,
sport: GradeScales.YDS,
bouldering: GradeScales.VSCALE,
tr: GradeScales.YDS,
alpine: GradeScales.YDS,
mixed: GradeScales.YDS,
aid: GradeScales.YDS,
snow: GradeScales.YDS, // is this the same as alpine?
ice: GradeScales.YDS // is this the same as alpine?
},
FR: {
trad: GradeScales.FRENCH,
sport: GradeScales.FRENCH,
bouldering: GradeScales.FONT,
tr: GradeScales.FRENCH,
alpine: GradeScales.FRENCH,
mixed: GradeScales.FRENCH,
aid: GradeScales.FRENCH,
snow: GradeScales.FRENCH, // is this the same as alpine?
ice: GradeScales.FRENCH // is this the same as alpine?
},
AU: {
trad: GradeScales.EWBANK,
sport: GradeScales.EWBANK,
bouldering: GradeScales.VSCALE,
tr: GradeScales.EWBANK,
deepwatersolo: GradeScales.EWBANK,
alpine: GradeScales.YDS,
mixed: GradeScales.YDS,
aid: GradeScales.AID,
snow: GradeScales.YDS, // is this the same as alpine?
ice: GradeScales.WI
}
}

export default class Grade {
context: GradeContextType
values: GradeValuesType
Expand Down