summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/commit_icon.js
blob: 4984b5bb91ddd0aa9d66df141a3bffd1e32c8bf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
import { commitItemIconMap } from './constants';

export default file => {
  if (file.deleted) {
    return commitItemIconMap.deleted;
  } else if (file.tempFile && !file.prevPath) {
    return commitItemIconMap.addition;
  }

  return commitItemIconMap.modified;
};